package com.study.feign;

import com.study.account.BalanceInfo;
import com.study.vo.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 不安全的用户账户服务 feign 接口
 */
@FeignClient(
        contextId = "NotSecureBalanceClient",
        value = "ecommerce-account-service"
)

public interface NotSecureBalanceClient {

    @RequestMapping(
            value = "ecommerce-account-service/balance/deduct-balance",
            method = RequestMethod.POST
    )
    CommonResponse<BalanceInfo> deductBalance(@RequestBody BalanceInfo balanceInfo);

}
